package net.lab1024.sa.admin.module.business.template.dao;

import java.util.List;
import net.lab1024.sa.admin.module.business.template.domain.entity.QuotationTemplateEntity;
import net.lab1024.sa.admin.module.business.template.domain.form.QuotationTemplateQueryForm;
import net.lab1024.sa.admin.module.business.template.domain.vo.QuotationTemplateItemsVO;
import net.lab1024.sa.admin.module.business.template.domain.vo.QuotationTemplateVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 报价单模版 Dao
 *
 * @Author zzx
 * @Date 2025-08-06 11:03:50
 * @Copyright zzx
 */

@Mapper
public interface QuotationTemplateDao extends BaseMapper<QuotationTemplateEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<QuotationTemplateVO> queryPage(Page page, @Param("queryForm") QuotationTemplateQueryForm queryForm);

    List<QuotationTemplateItemsVO> queryItemsByTempLateId(@Param("templateId") Long templateId);

    /**
     * 更新删除状态
     */
    long updateDeleted(@Param("templateId")Long templateId,@Param("deletedFlag")boolean deletedFlag);

    /**
     * 批量更新删除状态
     */
    void batchUpdateDeleted(@Param("idList")List<Long> idList,@Param("deletedFlag")boolean deletedFlag);

    List<QuotationTemplateVO> queryAll(@Param("queryForm") QuotationTemplateEntity queryForm);
}
